const app = getApp();
Page({
    data: {
      current:0,
      banners: [
        '../../images/banner.png',
        '../../images/banner1.png',
        '../../images/banner2.png'
      ],
      ribbonList: [
        { name: '功能1', imgUrl: '../../images/ribbon/img1.jpg' },
        { name: '功能2', imgUrl: '../../images/ribbon/img2.jpg' },
        { name: '功能3', imgUrl: '../../images/ribbon/img3.jpg' },
        { name: '功能4', imgUrl: '../../images/ribbon/img4.jpg' },
        { name: '功能5', imgUrl: '../../images/ribbon/img5.jpg' }
      ],
      inletList: [
        { name: '功能A', imgUrl: '../../images/inlet/img1.jpg' },
        { name: '功能B', imgUrl: '../../images/inlet/img2.jpg' },
        { name: '功能C', imgUrl: '../../images/inlet/img3.jpg' },
        { name: '功能D', imgUrl: '../../images/inlet/img4.jpg' },
        { name: '功能E', imgUrl: '../../images/inlet/img5.jpg' },
        { name: '功能F', imgUrl: '../../images/inlet/img6.jpg' },
        { name: '功能G', imgUrl: '../../images/inlet/img7.jpg' },
        { name: '功能H', imgUrl: '../../images/inlet/img8.jpg' },
        { name: '功能I', imgUrl: '../../images/inlet/img9.jpg' },
        { name: '功能J', imgUrl: '../../images/inlet/img10.jpg' },
      ],
      inletArr: [
        { name: '功能1', imgUrl: '../../images/inlet/img/1.jpg' },
        { name: '功能2', imgUrl: '../../images/inlet/img/2.jpg' },
        { name: '功能3', imgUrl: '../../images/inlet/img/3.jpg' },
        { name: '功能4', imgUrl: '../../images/inlet/img/4.jpg' },
        { name: '功能5', imgUrl: '../../images/inlet/img/5.jpg' },
        { name: '功能6', imgUrl: '../../images/inlet/img/6.jpg' },
        { name: '功能7', imgUrl: '../../images/inlet/img/7.jpg' },
        { name: '功能8', imgUrl: '../../images/inlet/img/8.jpg' },
        { name: '功能9', imgUrl: '../../images/inlet/img/9.jpg' },
        { name: '功能10', imgUrl: '../../images/inlet/img/10.jpg' },
      ]
    },
    onLoad() {
        console.log(this.data.height)
    },
    onShow: function () {
      app.getCurrentTabbar(0,this);
    },
    change(e) {
      this.setData({current:e.detail.current});
    },
    showModal(e) {
      if(e.currentTarget.dataset.index !== 1) {
        return
      }
      this.setData({
        modalName: e.currentTarget.dataset.target
      })
    },
    hideModal(e) {
      this.setData({
        modalName: null
      })
    }
})
